import unittest
import app
import uilt
from api.pyyuan公管理 import YuanGong

from parameterized import parameterized
class GongY(unittest.TestCase):
    @classmethod
    def setUpClass(cls) -> None:
        cls.ddd = YuanGong()

    filename = app.LUJING + "/data/" + "emp_111.json"
    @parameterized.expand(uilt.read1(filename))
    def test001_dl(self,login_data,add_emp_data,modify_emp_data,status_code,success,codo,message):

        a = self.ddd.deng(login_data)
        print(a.json())
        uilt.A()

        b = self.ddd.jia(add_emp_data)
        app.EMP_ID= b.json().get('data').get('id')
        # print(b.json())

        c = self.ddd.cha(app.EMP_ID)
        # print(c.json())


        repdata = {"username":"小猪佩奇"}
        d = self.ddd.xiugai(app.EMP_ID, modify_emp_data)
        # print(d.json())

        q = self.ddd.shanchu(app.EMP_ID)
        # print(q.json())

        list01 = self.ddd.chaliebiao()
        print(list01.json())
